package cn.wx.pet.domain;

import cn.wx.basic.domain.BaseDomain;
import cn.wx.org.domain.Shop;
import cn.wx.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Pet extends BaseDomain {
    private String name;
    //进价
    private BigDecimal costprice;
    //售价
    private BigDecimal saleprice;
    //类型
    private Long type_id;
    private PetType  type;
    //宠物图片资源
    private String resources;
    private Integer state = 0; //默认状态为0 代表上架

    //下架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date  offsaletime;

    //上架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;

    //购买时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date  createtime  = new Date();
    //店铺id
    private Long shop_id;
    private Shop shop;
    //购买者
    private Long user_id;
    private User user;

    //怎么样来的，0代表收购   1代表其他渠道
    private Long search_master_msg_id = 0L;

    private PetDetail petDetail;
}
